package com.ekeyman.securesavelib.domain;

import java.io.Serializable;

public class Registry implements Serializable {
	private static final long serialVersionUID = 4824895481416566095L;

	private long id;
	private long version;
	private String accessKeyId;
	private String secretAccessKey;
	private String bucketUri;
	private String publicKey;
	private String privateKey;
	private String applicationName;
	private String deviceId;
	
	public void setId(long id) {
		this.id = id;
	}
	public long getId() {
		return id;
	}

	
	public void setVersion(long version) {
		this.version = version;
	}
	public long getVersion() {
		return version;
	}
	public void setAccessKeyId(String accessKeyId) {
		this.accessKeyId = accessKeyId;
	}
	public String getAccessKeyId() {
		return accessKeyId;
	}
	public void setSecretAccessKey(String secretAccessKey) {
		this.secretAccessKey = secretAccessKey;
	}
	public String getSecretAccessKey() {
		return secretAccessKey;
	}
	public void setBucketUri(String bucketUri) {
		this.bucketUri = bucketUri;
	}
	public String getBucketUri() {
		return bucketUri;
	}
	public void setPublicKey(String publicKey) {
		this.publicKey = publicKey;
	}
	public String getPublicKey() {
		return publicKey;
	}
	public void setPrivateKey(String privateKey) {
		this.privateKey = privateKey;
	}
	public String getPrivateKey() {
		return privateKey;
	}
	public void setApplicationName(String applicationName) {
		this.applicationName = applicationName;
	}
	public String getApplicationName() {
		return applicationName;
	}
	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}
	public String getDeviceId() {
		return deviceId;
	}

	@Override
	public boolean equals(Object o){
		boolean result = false;
		if (o instanceof Registry){
			Registry rg = (Registry)o;
			if(applicationName.equalsIgnoreCase(rg.getApplicationName())
			&& deviceId.equalsIgnoreCase(rg.getDeviceId())) {
				result = true;
			}
		}
		return result;
	}
	
	@Override
	public int hashCode(){
		return 0;
	}
}
